<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>搜索</title>
		<link rel="stylesheet" type="text/css" href="../../css/mui.min.css" />
		<link rel="stylesheet" type="text/css" href="../../css/app.css" />
		<link rel="stylesheet" type="text/css" href="../../css/appOther.css"/>
		<style>
		</style>
	</head>

	<body id='app'>
		<header class="mui-bar mui-bar-nav">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">搜索</h1>
		</header>
		<div class="mui-content">
		    <div class="mui-input-row mui-search" style="margin-top: 10px;">
			    <input @keyup.enter='searchByKeyword' type="search" class="mui-input-clear" placeholder="搜索圈子..." style="margin-bottom: 10px;">
			</div>
			<ul class="mui-table-view  mui-table-view-chevron">
				<li @tap="searchByType($index+1,$event)" v-for='type in types' class="mui-table-view-cell">
					<a class="mui-navigate-right">
						<span style="margin-left:5px;font-size:16px;color: #000000;">{{type}}</span>
					</a>	
				</li>
			</ul>
		</div>
		<script src="../../js/mui.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/mui-extend.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/app.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			mui.init();
			var vm= new Vue({
				el:'#app',
				data:{
					types:["哲学", "经济学", "法学", "教育学", "心理学", "文学", "历史学", "理学", "工学", "农学", "医学", "管理学", "艺术学", "其他"],
				},
				ready:function () {
					$.plusReady(function () {
						showPage(plus.webview.currentWebview());
					})
				},
				methods:{
					searchByType:function(id, e) {
						openPage('../index/searchResult.html','searchResult',{type: id});
					},
					searchByKeyword:function (e) {
						var val = $(e.currentTarget).val();
						openPage('../index/searchResult.html','searchResult',{keyword: val});
					},
				}
			});
		</script>
	</body>

</html>